1
2
3
4 package joeq.ClassLib.ibm13_linux.com.ibm.jvm;
5
6 import joeq.Class.jq_Array;
7 import joeq.Class.jq_Reference;
8 import joeq.Class.jq_Type;
9 import joeq.Runtime.Reflection;
10
11 /***
12 * ExtendedSystem
13 *
14 * @author John Whaley <jwhaley@alum.mit.edu>
15 * @version $Id: ExtendedSystem.java 1456 2004-03-09 22:01:46Z jwhaley $
16 */
17 public abstract class ExtendedSystem {
18
19 private static boolean isJVMUnresettable() { return false; }
20
21 private static java.lang.Object resizeArray(int newSize, java.lang.Object array, int startIndex, int size) {
22 jq_Array a = (jq_Array)jq_Reference.getTypeOf(array);
23 java.lang.Object o = a.newInstance(newSize);
24 java.lang.System.arraycopy(array, 0, o, startIndex, size);
25 return o;
26 }
27 private static java.lang.Object newArray(java.lang.Class elementType, int size, java.lang.Object enclosingObject) {
28 jq_Type t = Reflection.getJQType(elementType);
29 jq_Array a = t.getArrayTypeForElementType();
30 return a.newInstance(size);
31 }
32
33 }